find_path(VIDEOCORE_INCLUDE_DIR bcm_host.h
	PATHS 
		/
		/usr
		/usr/local
	PATH_SUFFIXES
		opt/vc/include
	)

set(VIDEOCORE_INCLUDE_DIR ${VIDEOCORE_INCLUDE_DIR} 
	${VIDEOCORE_INCLUDE_DIR}/interface/vcos/pthreads
	${VIDEOCORE_INCLUDE_DIR}/interface/vmcs_host/linux
	)
set(VC_LIBS bcm_host openmaxil vcos vchiq_arm)
foreach(VC_LIB ${VC_LIBS})
	find_library(VC_LIB_PATH ${VC_LIB}
		PATHS
			/
			/usr
			/usr/local
		PATH_SUFFIXES
			opt/vc/lib
			)
	set(VIDEOCORE_LIBRARY ${VIDEOCORE_LIBRARY} ${VC_LIB_PATH})
endforeach(VC_LIB)

INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(videocore DEFAULT_MSG VIDEOCORE_LIBRARY VIDEOCORE_INCLUDE_DIR)

